package com.naiterui.ehp.bs.emr.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.naiterui.ehp.bp.bo.recommend.DiagnosisBO;
import com.naiterui.ehp.bp.bo.recommend.DiagnosisParamBO;
import com.naiterui.ehp.bp.bo.recommend.DrPointPrescriptionBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomBO;
import com.naiterui.ehp.bp.bo.recommend.MedicationRecomDetailBO;
import com.naiterui.ehp.bp.bo.recommend.PatientDiagnisisBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import com.naiterui.ehp.bp.support.exception.BusinessException;

import springfox.documentation.annotations.ApiIgnore;

/**
 * @Description 处方服务
 * @Author gongbaoqiang
 * @Date 2020/7/2 10:56 AM
 */
@ApiIgnore
@RequestMapping("inner")
@FeignClient(name = "emrTuijian", url = "${ehp.domain.tuijian}", configuration = FeignConfiguration.class)
public interface IRecommendFeignClient {

    /**
     * 更新患者诊断信息
     * @param bo
     * @throws BusinessException
     */
    @PostMapping("/diagnosis/patient/lastest/update")
    void updateDiagnosis(@RequestBody PatientDiagnisisBO bo) throws BusinessException;

    /**
     * 更新诊断
     * @param diagnosisParamVO
     * @return
     * @throws Exception
     */
    @PostMapping("/diagnosis/update")
    List<DiagnosisBO> getDiagnosisList(@RequestBody DiagnosisParamBO diagnosisParamVO) throws Exception;

    /**
     * 根据会话id列表获取处方信息列表
     *
     * @param consultSessionIds
     * @return
     * @throws BusinessException
     */
    @GetMapping("/recom/list/session")
    List<MedicationRecomBO> getRecomSessionList(@RequestParam("consultSessionIds") String consultSessionIds)
        throws BusinessException;

    /**
     * 根据会话id列表获取处方信息列表
     *
     * @param recomIds
     * @return
     * @throws BusinessException
     */
    @GetMapping("/prescription/list/get")
    List<DrPointPrescriptionBO> getPrescriptionList(@RequestParam("recomIds") String recomIds) throws BusinessException;

    /**
     * 获取推荐单详情列表
     *
     * @param recomIds
     * @return
     */
    @PostMapping("/recomdetail/list/get")
    List<MedicationRecomDetailBO> getRecomDetailList(@RequestParam("recomIds") String recomIds);

}
